<template>
	<view>
		<view style="height: 254rpx;" class="w-1 relative">
			<image class="w-1 h-1 absolute-0" src="/static/images/tab4/wbg.png" mode=""></image>
			<view class="relative w-1 h-1 fl-c">
				<view class="fr-c" @click="show=!show">
					<text class="c-ff fs-28 m-r-10">累计收入</text>	
					<up-icon color="#ffffff" size="33rpx" :name="show?'eye-fill':'eye-off'"></up-icon>
				</view>
				<price class="c-ff m-t-10" v-if="show" :price="income_money"></price>
				<text class="c-ff fs-48" v-if="!show">****</text>
			</view>
		</view>
		<view class="w-1 p-r-30 relative" style="margin-top: -30rpx;">
			<view class="w-1 fr-s-c br-20 bg-ff" style="padding: 46rpx 20rpx;">
				<view class="fl-c w-5">
					<view class="fr-c" @click="show1=!show1">
						<text class="c-33 fs-28 m-r-20">累计提现</text>
						<up-icon color="#cfcfcf" size="33rpx" :name="show1?'eye-fill':'eye-off'"></up-icon>
					</view>
					<price v-if="show1" :price="with_money"></price>
					<text class="c-33 fs-48" v-if="!show1">****</text>
				</view>
				<view class="col-line"></view>
				<view class="fl-c w-5">
					<view class="fr-c" @click="show2=!show2">
						<text class="c-33 fs-28 m-r-20">可提现余额</text>
						<up-icon color="#cfcfcf" size="33rpx" :name="show2?'eye-fill':'eye-off'"></up-icon>
					</view>
					<price v-if="show2" :price="money"></price>
					<text class="c-33 fs-48" v-if="!show2">****</text>
				</view>
			</view>
			
			<view class="zdbox w-1 p-r-30 m-t-20 fr-b-c" @click="$u.route('/pagemaster/pages/User/Bill')">
				<text class="c-33 fs-28 bold">账单</text>
				<up-icon name="arrow-right"></up-icon>
			</view>
		</view>
		
		<view class="w-1 iphonex bg-ff">
			<view class="w-1 p-30">
				<view class="big-btn" @click="$to('/pagemaster/pages/User/Withdrawal')">去提现</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	const show = ref(true)
	const show1 = ref(true)
	const show2 = ref(true)
	
	const income_money = ref(0);
	const money = ref(0);
	const with_money = ref(0);
	onLoad(()=>{
		getinfo()
	})
	function getinfo(){
		uni.$post({
			url:'/api/User/myincome'
		}).then(res=>{
			income_money.value = res.data.income_money;
			money.value = res.data.money;
			with_money.value = res.data.with_money;
		})
	}
</script>

<style>
page{
	background: #f1f5f6;
}

.col-line{
	width: 0rpx;
	height: 138rpx;
	border: 2rpx solid #E9E9E9;
}

.zdbox{
	height: 96rpx;
	background: #FFFFFF;
	border-radius: 20rpx 20rpx 20rpx 20rpx;
}
</style>
